Skip to content

Described disabling counting the results#3180

Merged
mnocon merged 3 commits into5.0from
search-perform-count
May 7, 2026
Merged

Described disabling counting the results#3180
mnocon merged 3 commits into5.0from
search-perform-count

Conversation

@mnocon
Copy link
Copy Markdown
Contributor

@mnocon mnocon commented May 5, 2026

Target: 5.0, 4.6

Based on feedback provided on community Slack

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Preview of modified files

Preview of modified Markdown:

@mnocon mnocon force-pushed the search-perform-count branch from 820fd0e to e08b557 Compare May 6, 2026 10:13
@mnocon mnocon requested a review from a team May 6, 2026 10:26
@mnocon mnocon requested a review from a team May 6, 2026 10:29
@ibexa-workflow-automation-1 ibexa-workflow-automation-1 Bot requested review from adriendupuis, dabrt and julitafalcondusza and removed request for a team May 6, 2026 10:29
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

code_samples/ change report

Before (on target branch)After (in current PR)

code_samples/api/public_php_api/src/perform_count.php


code_samples/api/public_php_api/src/perform_count.php

docs/search/search_api.md@69:``` php
docs/search/search_api.md@70:[[= include_code('code_samples/api/public_php_api/src/perform_count.php') =]]
docs/search/search_api.md@71:```

001⫶<?php declare(strict_types=1);
002⫶
003⫶use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery;
004⫶use Ibexa\Contracts\Core\Repository\Values\Content\Query;
005⫶
006⫶/** @var \Ibexa\Contracts\Core\Repository\SearchService $searchService */
007⫶
008⫶// For location searches
009⫶$locationQuery = new LocationQuery();
010⫶$locationQuery->performCount = false;
011⫶
012⫶$locationResult = $searchService->findLocations($locationQuery);
013⫶
014⫶// For content searches
015⫶$contentQuery = new Query();
016⫶$contentQuery->performCount = false;
017⫶
018⫶$contentResult = $searchService->findContent($contentQuery);

Download colorized diff

Copy link
Copy Markdown
Contributor

@adriendupuis adriendupuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example is a bit long. We could hightlight the two lines ->performCount = false;

But it's strange to execute an empty request, the example is a bit long for what it documents. I would focus more on the query setting and forget the surrounding. Previous and following full examples are there for that.

Comment thread docs/search/search_api.md Outdated
Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
@mnocon mnocon requested a review from adriendupuis May 7, 2026 13:24
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

@mnocon mnocon merged commit c867aef into 5.0 May 7, 2026
9 checks passed
@mnocon mnocon deleted the search-perform-count branch May 7, 2026 14:08
mnocon added a commit that referenced this pull request May 7, 2026
* Described disabling counting the results

* Fixed link

* Update docs/search/search_api.md

Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>

---------

Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants